package com.example.jyjava.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Comment {
    private Integer id;
    private Integer shopId;
    private Integer orderId;
    private Integer userId;
    private Integer sellerId;
    private String content;
    private String score;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creatTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    private Integer commentId;
    private String commentUrl;
    private boolean deleteType;
    private User user;

    public Comment() {
    }

    public Comment(Integer id, Integer shopId, Integer orderId, Integer userId, Integer sellerId, String content, String score, Date creatTime, Date updateTime, Integer commentId, String commentUrl, boolean deleteType, User user) {
        this.id = id;
        this.shopId = shopId;
        this.orderId = orderId;
        this.userId = userId;
        this.sellerId = sellerId;
        this.content = content;
        this.score = score;
        this.creatTime = creatTime;
        this.updateTime = updateTime;
        this.commentId = commentId;
        this.commentUrl = commentUrl;
        this.deleteType = deleteType;
        this.user = user;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getSellerId() {
        return sellerId;
    }

    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public boolean isDeleteType() {
        return deleteType;
    }

    public void setDeleteType(boolean deleteType) {
        this.deleteType = deleteType;
    }

    public String getCommentUrl() {
        return commentUrl;
    }

    public void setCommentUrl(String commentUrl) {
        this.commentUrl = commentUrl;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", shopId=" + shopId +
                ", orderId=" + orderId +
                ", userId=" + userId +
                ", sellerId=" + sellerId +
                ", content='" + content + '\'' +
                ", score='" + score + '\'' +
                ", creatTime=" + creatTime +
                ", updateTime=" + updateTime +
                ", commentId=" + commentId +
                ", commentUrl='" + commentUrl + '\'' +
                ", deleteType=" + deleteType +
                ", user=" + user +
                '}';
    }
}
